<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.coati.eSourcetrail</groupId>
  <artifactId>eSourcetrail</artifactId>
  <version>0.0.2-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>eSourcetrail :: parent</name>
  <description>eSourcetrail parent</description>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <tycho.version>1.0.0</tycho.version>
    <tycho.extras.version>1.0.0</tycho.extras.version>
    <tycho.test.platformArgs/>
    <tycho.test.jvmArgs>-Xmx512m</tycho.test.jvmArgs>

  </properties>

  <repositories>
    <repository>
      <id>neon</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/neon</url>
    </repository>
  </repositories>
  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>${tycho.version}</version>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <resolver>p2</resolver>
          <pomDependencies>consider</pomDependencies>
          <ignoreTychoRepositories>true</ignoreTychoRepositories>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-source-plugin</artifactId>
        <version>${tycho.version}</version>
        <executions>
          <execution>
            <id>attach-source</id>
            <goals>
              <goal>plugin-source</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-packaging-plugin</artifactId>
          <version>${tycho.version}</version>
          <configuration>
            <format>yyyyMMdd-HHmm</format>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-surefire-plugin</artifactId>
          <version>${tycho.version}</version>
          <configuration>
            <useUIHarness>true</useUIHarness>
            <argLine>${tycho.test.jvmArgs}</argLine>
            <!-- kill test JVM if tests take more than 1 minute (60 seconds) to finish -->
            <forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>macosx</id>
      <activation>
        <os><family>mac</family></os>
      </activation>
      <properties>
        <tycho.test.platformArgs>-XstartOnFirstThread</tycho.test.platformArgs>
      </properties>
    </profile>
    <profile>
      <id>source-feature</id>
      <activation>
      <file>
        <exists>feature.xml</exists>
      </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-source-feature-plugin</artifactId>
            <version>${tycho.extras.version}</version>
            <executions>
              <execution>
                <id>source-feature</id>
                <phase>package</phase>
                <goals>
                  <goal>source-feature</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-plugin</artifactId>
            <version>${tycho.version}</version>
            <executions>
              <execution>
                <id>attach-p2-metadata</id>
                <phase>package</phase>
                <goals>
                  <goal>p2-metadata</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <modules>
    <module>eSourcetrail.core</module>
    <module>eSourcetrail.test</module>
    <module>eSourcetrail.feature</module>
    <module>eSourcetrail.site</module>
  </modules>
</project>